

#include "stdafx.h"
#include "SmartTradeEventSystem.h"
#include "ComplexEventSystem.h"



SMARTTRADECOMPLEXEVENTENGINE_API void __stdcall ev_start()
{
	CEPSingleton::Instance().StartListenerThread();
}

SMARTTRADECOMPLEXEVENTENGINE_API void __stdcall ev_send_event(
	const char* pEventCode,
	const void* pEventInst)
{
	if(pEventCode == NULL || pEventCode[0] == 0)
		return;
	CEPSingleton::Instance().SendEvent(pEventCode,pEventInst);
}

SMARTTRADECOMPLEXEVENTENGINE_API void __stdcall ev_reg_evtmon(
	const char* pEventCode,
	const int iCallbackAddr,
	const void* pMonitorInst)
{

	if(pEventCode == NULL || pEventCode[0] == 0)
		return;
	CEPSingleton::Instance().RegisterEventMonitor(pEventCode,iCallbackAddr,pMonitorInst);
}

SMARTTRADECOMPLEXEVENTENGINE_API void __stdcall ev_unreg_evtmon(
	const char* pEventCode,
	const int iCallbackAddr,
	const void* pMonitorInst)
{
	if(pEventCode == NULL || pEventCode[0] == 0)
		return;
	CEPSingleton::Instance().UnRegisterEventMonitor(pEventCode,iCallbackAddr,pMonitorInst);
}